import org.apache.flink.streaming.api.datastream.DataStreamSink;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * description
 * created by A on 2022/5/7
 */
public class Flink_Response {


    public static void main(String[] args) {
        //1.创建环境
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        DataStreamSource<String> ds = env.addSource(new Request_Source(9999, 100));

        //如果需要将接收到的HTTP数据写入到其他数据源，就加上这个Sink方法
        //ds.addSink(new Response_Sink());

        //提交任务
        //必须要有print方法
        ds.print();
        try {
            env.execute();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
